﻿using System.Web.Services;
using NorthwindBusinessObjects;

/// <summary>
/// Summary description for WebService
/// </summary>
[WebService(Namespace = "http://northwind.catalystobjects.com/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1, Namespace = "http://northwind.catalystobjects.com/", Location = "http://northwind.catalystobjects.com/")]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
// [System.Web.Script.Services.ScriptService]
public class WebService : System.Web.Services.WebService
{
	[WebMethod(MessageName = "GetRegions", Description = "Returns a collection of regions")]
	public RegionCollection GetRegions()
	{
		RegionCollection regions = new RegionCollection().LoadAll();

		return regions;
	}

	[WebMethod(MessageName = "GetTerritories", Description = "Returns a collection of territories")]
	public TerritoryCollection GetTerritories()
	{
		TerritoryCollection territories = new TerritoryCollection().LoadAll();

		return territories;
	}
}

